Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add policy container to request #1231

Merged
merged 4 commits into from
May 10, 2021
Merged

Add policy container to request #1231

merged 4 commits into from
May 10, 2021

Conversation

antosart
Copy link
Member

@antosart antosart commented May 6, 2021

This change adds a policy container to the request. The idea is to snapshot the policies when the request is created and have them available for the whole lifetime of the fetch algorithm. Together with a change to CSP, this will solve #832.


Preview | Diff

fetch.bs Outdated Show resolved Hide resolved
fetch.bs Outdated Show resolved Hide resolved
fetch.bs Outdated Show resolved Hide resolved
fetch.bs Outdated Show resolved Hide resolved
@annevk
Copy link
Member

annevk commented May 10, 2021

@antosart I moved the defaulting slightly and also did some more rewrapping. Let me know if you have any final thoughts.

I'll reference w3c/webappsec-csp#494 from the eventual commit message. I suppose this should land first?

@antosart
Copy link
Member Author

@annevk thanks!

Yes, this one should land first, since w3c/webappsec-csp#494 depends on this one.

@annevk annevk merged commit 3c0dd16 into whatwg:main May 10, 2021
antosart added a commit to w3c/webappsec-csp that referenced this pull request May 12, 2021
This change depends on whatwg/fetch#1231 and whatwg/html#6659 which add and populate a request's policy container. This change relies on the request's policy container CSP list (instead of the request's client's environment setting object's CSP list) for the checks. This enforces consistency, since the the request's client's environment setting object's CSP list can change during the lifetime of an asynchronous fetch (for example, when following redirects, or when doing a response check), while the request's policy container CSP list is a snapshot at request's creation time.
ryandel8834 added a commit to ryandel8834/WebAppSec-CSP that referenced this pull request Aug 13, 2022
This change depends on whatwg/fetch#1231 and whatwg/html#6659 which add and populate a request's policy container. This change relies on the request's policy container CSP list (instead of the request's client's environment setting object's CSP list) for the checks. This enforces consistency, since the the request's client's environment setting object's CSP list can change during the lifetime of an asynchronous fetch (for example, when following redirects, or when doing a response check), while the request's policy container CSP list is a snapshot at request's creation time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants